package uicgas.pump;

import uicgas.pump.device.PhysicalPump.GasolineGrade;

/**
 * Interface for listen the pump's state changing
 * 
 * @author Hong Wang
 *
 */
public interface PumpStateChangeNotifiable
{
	/**
	 * Physical pump invoke this method whenever the amount of pumping money is changed.
	 * 
	 * @param grade Pumping gas grade
	 * @param currentGasAmount The amount of gas pumped so far
	 * @param currentMoneyAmount The amount of money pumped so far
	 */
	void ammountChanged(GasolineGrade grade, double currentGasAmount,
			double currentMoneyAmount);

	//	void stoppedPumping(GasolineGrade grade, double currentGasAmount,
	//			double currentMoneyAmount);

	/**
	 * Physical pump invoke this method when pumping is finished. 
	 * 
	 * @param grade Pumped gas grade
	 * @param currentGasAmount The amount of gas pumped so far
	 * @param currentMoneyAmount The amount of money pumped so far
	 */
	void finishedPumping(GasolineGrade grade, double currentGasAmount,
			double currentMoneyAmount);

	/**
	 * Physical pump is ready for pumping.
	 */
	void readyForPumping();
}
